import torch

m = torch.rand(3, 5)
print(f'm={m}')

m2 = torch.rand(2, 3)
print(f'm2={m2}')
m[1:3, 1:4] = m2
print(f'm={m}')

m3 = torch.rand(3, 5)
print(f'm3={m3}')
m3[:, :] = m
print(f'm3={m3}')

m4 = m3[1:3, 1:3]
m5 = torch.rand(2, 2)
print(f'm5={m5}')
m4[:, :] = m5
print(f'm3={m3}')


